<!--{template admin/header}-->

<!--{if 'modify'==$this->Code}-->

    <form method="post" action="admin.php?mod=jyapi&code=do_modify" enctype="multipart/form-data">
    <input type="hidden" name="id" value="{$apps[id]}" />
       <table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
    		<tr class="header">
    			<td colspan="2">新增api应用</td>
    		</tr>
    		<tr>
    			<td class="altbg1" width="40%">
                    <b>应用名称:</b>
                    <span class="smalltxt"></span><br />			
    			</td>
    			<td class="altbg2">
    			 <input type="text" name="title" value="{$apps[title]}"  style="width:300px;" />
    			</td>
    		</tr>
    		<tr>
    			<td class="altbg1" width="40%">
                    <b>应用logo:</b>
                    <span class="smalltxt"></span><br />			
    			</td>
    			<td class="altbg2"><img src="images/api/{$apps[pic]}" /><br />
    			 <input type="file" name="pic" id="pic"  style="width:300px;" />
    			</td>
    		</tr>
    		<tr>
    			<td class="altbg1" width="40%">
                    <b>应用url:</b>
                    <span class="smalltxt"></span><br />			
    			</td>
    			<td class="altbg2">
    			<input type="text" name="url"  value="{$apps[url]}" style="width:300px;" />
    			</td>
    		</tr>
    		<tr>
    			<td class="altbg1" width="40%">
                    <b>应用分类：</b>
                    <span class="smalltxt">
                    </span><br />			
    			</td>
    			<td class="altbg2">
    			<select name="category">
				<option value="商务"   <!--{if $apps[category] == '商务'}--> selected="selected"<!--{/if}-->>商务</option>
				<option value="工具"  <!--{if $apps[category] == '工具'}--> selected="selected"<!--{/if}-->>工具</option>
				<option value="娱乐"  <!--{if $apps[category] == '娱乐'}--> selected="selected"<!--{/if}-->>娱乐</option>
				<option value="合作"  <!--{if $apps[category] == '合作'}--> selected="selected"<!--{/if}-->>合作</option>
				</select> 
    			</td>
    		</tr>
    		
    	</table>
    	<br />
    	<center><input class="button" type="submit" name="cronssubmit" value="提 交" /> &nbsp; <input class="button" type="button" value="返 回" onclick="window.location.href='admin.php?mod=api'" /></center>
    	<br />
    </form>

<!--{else}-->

<form method="post" action="admin.php?mod=api&code=do_modify_setting">
	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
    	<tr class="header">
    	   <td colspan="6">API应用列表&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="button" value="新 增" class="button" onclick="window.location.href='admin.php?mod=jyapi&code=add'"/></td>
    	</tr>
    	  	<tr class="altbg1">
    		<td>应用名称</td>
            <td>应用logo</td>
    		<td>应用url</td>
    		<td>应用类型</td>
            <td>其他操作</td>
    	</tr>
       	<!--{loop $apps_list $apps}-->
    	<tr align="center">
    		<td class="altbg2">
            {$apps[title]}
    	    </td>
    		<td class="altbg2"><img src="images/api/{$apps[pic]}" /></td>
    		<td class="altbg2"> {$apps[url]}</td>
    		<td class="altbg2">{$apps[category]} </td>
    		<td class="altbg2"> 
              <a onclick="return confirm('删除后的内容不可恢复，确认删除？');" href="admin.php?mod=jyapi&code=delete&id={$apps[id]}">删除</a> &nbsp;             
                <a href="admin.php?mod=jyapi&code=modify&id={$apps[id]}">编辑</a> &nbsp;             
            </td>
    	</tr>
    	<!--{/loop}-->
           
	</table>
	<br />

</form>

<!--{/if}-->